package com.demo.studentmanager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.studentmanager.dao.UserMapper;
import com.demo.studentmanager.dto.UserListDto;
import com.demo.studentmanager.entity.User;
import com.demo.studentmanager.service.IUserService;
import com.demo.studentmanager.vo.UserVo;
import org.springframework.stereotype.Service;

/**
 * @author wx
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    @Override
    public IPage<UserVo> getUserList(UserListDto userListDto) {
        IPage<UserVo> page = new Page<>(userListDto.getCurrent(), userListDto.getSize());
        return baseMapper.getUserList(page, userListDto);
    }
}
